<?php

namespace App\Transformers;

use App\Models\Picture;

class PictureTransformer extends BaseTransformer
{
    public function transform(Picture $model)
    {
        return [
            'id' => $model->id,
            'user_id' => $model->user_id,                           #用户id
            'picture' => image_url($model->picture),
            'created_at' => $model->created_at->toDateTimeString(),
        ];
    }
}
